<?php

namespace App\Http\Controllers\api;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;

class UserController extends Controller
{
    //
    public function index(Request $request)
    {
        // return \App\Model\User::find($id);

        $res = \App\Model\User::where('token',$request->token)
            ->get([
                'id',
                'phone',
                'nick_name',
                'avatar_url',
                'gender',
                'city',
                'province',
                'balance'
            ]);

        returnJson('查询成功',0,$res);
    }

}
